<!DOCTYPE html>
<html>

<head>
  <title>Sprint Boot Contacts</title>
  <link rel="stylesheet" th:href="@{/style.css}" />
</head>

<body>
  <h2>Spring Boot Contacts</h2>
  <form method="POST">
    <div>
      <label>First Name:</label>
      <input type="text" name="firstName" />
    </div>
    <div>
      <label>Last Name:</label>
      <input type="text" name="lastName" />
    </div>
    <div>
      <label>Phone Number:</label>
      <input type="text" name="phoneNumber" />
    </div>
    <div>
      <label>Email Address:</label>
      <input type="text" name="emailAddress" />
    </div>
    <div>
      <button type="submit">提交</button>
    </div>
  </form>
  <ul th:each="contact : ${contacts}">
    <li>
      <span th:text="${contact.firstName}">First</span>
      <span th:text="${contact.lastName}">Last</span> :
      <span th:text="${contact.phoneNumber}">PhoneNumber</span>
      <span th:text="${contact.emailAddress}">EmailAddress</span>
    </li>
  </ul>
</body>

</html>